
<template class="container">
    <div class="tip" v-bind:style="TipStyle()">{{text or ""}}</div>
</template>

<script type="text/lua">

function TipStyle()
    return string.format("color: %s;", color or "#000000");
end

-- 显示时间
commonlib.SetTimeout(duration or 3000, function()
    CloseWindow();
end);
</script>

<style>
.container {
    width: 100%;
    height: 100%;
    background-color: #00000020;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tip {
    text-align: center;
    height: 40px;
    line-height: 40px;
    font-size: 18px;
    color: #000000;
    font-weight: bold;
}
</style>